Optimal. Leaf size=55 \[ \frac {\tanh ^{-1}(\sin (e+f x))}{b f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b f \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4147, 391, 206, 208} \[ \frac {\tanh ^{-1}(\sin (e+f x))}{b f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b f \sqrt {a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 208
Rule 391
Rule 4147
Rubi steps
\begin {align*} \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a+b-a x^2\right )} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{b f}-\frac {a \operatorname {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{b f}\\ &=\frac {\tanh ^{-1}(\sin (e+f x))}{b f}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b \sqrt {a+b} f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.35, size = 1022, normalized size = 18.58 \[ \frac {(\cos (2 (e+f x)) a+a+2 b) \sec ^2(e+f x) \left (-4 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\sqrt {a} \cos (e) \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right )+\sqrt {a} \cos (e) \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right )-2 i \sqrt {a} \tan ^{-1}\left (\frac {2 \sin (e) \left (\sin (2 e) a+i a-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+\sqrt {a+b} \cos (f x) \sqrt {(\cos (e)-i \sin (e))^2} \sqrt {a}-\sqrt {a+b} \cos (2 e+f x) \sqrt {(\cos (e)-i \sin (e))^2} \sqrt {a}+i b+i (a+b) \cos (2 e)+b \sin (2 e)\right )}{i (a+3 b) \cos (e)+i (a+b) \cos (3 e)+i a \cos (e+2 f x)+i a \cos (3 e+2 f x)+3 a \sin (e)+b \sin (e)+a \sin (3 e)+b \sin (3 e)+a \sin (e+2 f x)-a \sin (3 e+2 f x)}\right ) (\cos (e)-i \sin (e))+i \sqrt {a} \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right ) \sin (e)-i \sqrt {a} \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt {a}+2 \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt {a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right ) \sin (e)+2 \sqrt {a} \tan ^{-1}\left (\frac {(a+b) \sin (e)}{(a+b) \cos (e)-\sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} (\cos (2 e)+i \sin (2 e)) \sin (e+f x)}\right ) (i \cos (e)+\sin (e))+4 \sqrt {a+b} \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {(\cos (e)-i \sin (e))^2}\right )}{8 b \sqrt {a+b} f \left (b \sec ^2(e+f x)+a\right ) \sqrt {(\cos (e)-i \sin (e))^2}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.96, size = 157, normalized size = 2.85 \[ \left [\frac {\sqrt {\frac {a}{a + b}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, {\left (a + b\right )} \sqrt {\frac {a}{a + b}} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}, \frac {2 \, \sqrt {-\frac {a}{a + b}} \arctan \left (\sqrt {-\frac {a}{a + b}} \sin \left (f x + e\right )\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 68, normalized size = 1.24 \[ -\frac {a \arctanh \left (\frac {a \sin \left (f x +e \right )}{\sqrt {\left (a +b \right ) a}}\right )}{f b \sqrt {\left (a +b \right ) a}}-\frac {\ln \left (-1+\sin \left (f x +e \right )\right )}{2 f b}+\frac {\ln \left (1+\sin \left (f x +e \right )\right )}{2 f b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 83, normalized size = 1.51 \[ \frac {\frac {a \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b} + \frac {\log \left (\sin \left (f x + e\right ) + 1\right )}{b} - \frac {\log \left (\sin \left (f x + e\right ) - 1\right )}{b}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.58, size = 456, normalized size = 8.29 \[ \frac {\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )}{b\,f}+\frac {\mathrm {atan}\left (\frac {\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )+\frac {\left (2\,a^2\,b^2-\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{b^2+a\,b}+\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )-\frac {\left (2\,a^2\,b^2+\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{b^2+a\,b}}{\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )+\frac {\left (2\,a^2\,b^2-\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{b^2+a\,b}-\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )-\frac {\left (2\,a^2\,b^2+\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{b^2+a\,b}}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{f\,\left (b^2+a\,b\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________